{{include template('public/header','admin')}}
<body>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="page-header">
                    <h3>[{{$modelname}}]字段</h3>
                    <div class="opt-btn">
                        <a href="/admin/model_field/add/?modelid={{ticky\request::get('modelid', 0)}}" class="btn btn-primary bar-btn">
                            <i class="fa fa-fw fa-plus"></i>{{L('add')}}
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <form method="post" action="/admin/model_field/delete" class="form-inline" role="form">
                    <table id='Modelfieldlist' class="table table-condensed table-hover table-striped tablesorter table-fixed table-selectable">
                        <thead>
                            <tr>
                                <th style="width: 15px;"><input type="checkbox" name="chk" class="checkbox" onclick="checkAll('prefix', this.form, 'ids', 'chk')" /></th>
                                <th>{{L('modelfield_fieldid')}}</th>
                                <th>{{L('modelfield_field')}}</th>
                                <th>{{L('modelfield_fieldtype')}}</th>
                                <th>{{L('modelfield_name')}}</th>
                                <th>{{L('modelfield_datatype')}}</th>
                                <th>{{L('modelfield_css')}}</th>
                                <th>{{L('modelfield_defaultvalue')}}</th>
                                <th>{{L('modelfield_listorder')}}</th>
                                <th>{{L('modelfield_status')}}</th>
                                <th>{{L('edit')}}</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{foreach $items as $item}}
                            <tr>
                                <td><input type="checkbox" class="checkbox" name="ids[]" value="{{$item.fieldid}}" /></td>
                                <td >{{$item.fieldid}}</td>
                                <td >{{$item.field}}</td>
                                <td >{{$item.fieldtype}}</td>
                                <td >{{$item.name}}</td>
                                <td >{{$item.datatype}}</td>
                                <td >{{$item.css}}</td>
                                <td >{{$item.defaultvalue}}</td>
                                <td >{{$item.listorder}}</td>
                                <td>{{update_status('/admin/model_field','model_field','fieldid',$item.fieldid,'status',$item.status)}}</td>
                                <td style="width: 15%">
                                    <a href="/admin/model_field/update/?modelid={{ticky\request::get('modelid', 0)}}&fieldid={{$item.fieldid}}"  class="btn btn-warning btn-xs">{{L('edit')}}</a>
                                    <a href="javascript:;" onclick="layer_del('/admin/model_field/delete/?fieldid={{$item.fieldid}}')"  class="btn btn-danger btn-xs" >{{L('delete')}}</a>
                                </td>
                            </tr>
                            {{/foreach}}
                        </tbody>
                        <tr>
                            <td colspan="15">
                                <div style="text-align: left;">
                                    <input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'ids')" />{{L('chkall')}}
                                    <input type="radio" class="radio" id="optype_outer" name="optype" value="del" />{{L('delete')}}
                                    <input type="submit" class="btn" name="sendsubmit" value="{{L('submit')}}" />
                                    {{include template('public/page','admin')}}
                                </div>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
